import { _decorator, Component, Node } from 'cc';
import { Item } from './Item';
const { ccclass, property } = _decorator;

// 药品类，继承自物品类
@ccclass('Medicine')
export class Medicine extends Item {

    itemType: string='药品';
    @property
    healingAmount: number = 0; // 添加治疗量属性

    constructor(name: string, description: string, quantity: number, itemType: string, healingAmount: number) {
        super(name, description, itemType, quantity); // 传递物品类型参数
        this.healingAmount = healingAmount; // 初始化治疗量属性
    }
}


